]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix critical when setting a NULL label
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 1 Aug 2011 14:14:23 +0000 (16:14 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 1 Aug 2011 14:40:25 +0000 (16:40 +0200)
st_label_set_text() does not accept NULL, and emits a g_critical
in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=654638

js/ui/status/network.js

index a4372b5a53cf372e8d5485af27432fec80a4571e..a4081ffee968475abcbfb9b918e3771950e96e13 100644 (file)
@@ -674,7 +674,7 @@ NMDevice.prototype = {
         let dev_product = this.device.get_product();
         let dev_vendor = this.device.get_vendor();
         if (!dev_product || !dev_vendor)
-           return null;
+           return '';
 
         let product = Util.fixupPCIDescription(dev_product);
         let vendor = Util.fixupPCIDescription(dev_vendor);